<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>APP后台管理系统-新增APP版本信息</title>
	<link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="../../css/add_version_msg.css">
</head>
<body>
	<!-- left col-md-2 -->
	<aside>
		<h2>APP BMS</h2>
		
		<!-- 个人信息显示 -->
		<div>
			<img src="../../img/head.png" />
			<div id="mes">
				<span>Welcome.</span>
				<span>admin</span>
			</div>
			<p>系统管理员</p>
		</div>
		<hr class="simple" color="#6f5499" />		
		
		<!-- 下拉列表 -->
		<div id="drop-list">
			<h3>APP账户管理</h3>
			<a href="msg_manager.html?pageNum=1">APP列表</a><br/>
			<h3>APP应用管理</h3>
			<a href="add_msg.html">新增APP基础信息</a><br/>
		</div>

		<!-- 底栏菜单项 -->

	</aside>

	<!-- right col-md-10 -->
	<div id="right-div">

		<!-- 下拉导航 -->
		 <div id="drop-nav">
		 	<a class="btn btn-danger" href="login.html">退出</a>
		 	<img src="../../img/head.png" />
		 </div>

		<!-- 表格 -->
		<div id="table-list">
				<h4>新增APP版本信息</h4>
				<span>测试用户 xxx</span>
				<hr color="#6f5499" style="margin-top: 5px;margin-bottom: 5px;" />
				<h4>历史版本信息</h4>
				<hr color="#6f5499" style="margin-top: 5px;margin-bottom: 15px;" />
	            <table id="history_version_list" class="table table-striped table-bordered">
	              <thead>
	                <tr>
	                  <th>软件名称</th>
	                  <th>版本号</th>
	                  <th>版本大小(单位：MB)</th>
	                  <th>发布状态</th>
	                  <th>APK文件下载</th>
					  <th>最新更新时间</th>
	                </tr>
	              </thead>

	              <tbody>
	                <tr class="history_version_row" v-for="(version, index) in versionList"
						:key="index" @click="historyVersionClick(version.versionId)">
	                  <td>{{version.softwareName}}</td>
	                  <td>{{version.versionNo}}</td>
	                  <td>{{version.versionSize}}</td>
	                  <td>{{version.publishStatusName}}</td>
	                  <td>{{version.apkFileName}}</td>
					  <td>{{version.modifyDate}}</td>
	                </tr>
	              </tbody>
	            </table>

				<h4>新增版本信息</h4>
				<hr color="#6f5499" style="margin-top: 5px;margin-bottom: 5px;" />
			<form id="app_version_form" class="form-horizontal" enctype="multipart/form-data">
				<!-- 13个条目 -->
				<div class="form-group">
					<label for="versionNo" class="col-sm-2 control-label">版本号 *</label>
					<div class="col-sm-8">
						<input type="text" class="form-control" id="versionNo" name="versionNo"
							   placeholder="请输入版本号">
					</div>
				</div>

				<div class="form-group">
					<label for="versionSize" class="col-sm-2 control-label">版本大小 *</label>
					<div class="col-sm-8">
						<input type="number" class="form-control" id="versionSize" name="versionSize"
							   placeholder="请输入版本大小，单位为MB">
					</div>
				</div>

				<div class="form-group">
					<label for="publishStatusName" class="col-sm-2 control-label">发布状态 *</label>
					<div class="col-sm-8">
						<select style="line-height: 35px;" class="form-control"
								id="publishStatusName" name="publishStatusName" >
							<option v-for="status in statusList">{{status}}</option>
						</select>
					</div>
				</div>

				<div class="form-group">
					<label for="versionInfo" class="col-sm-2 control-label">版本简介 *</label>
					<div class="col-sm-8">
						<textarea class="form-control" id="versionInfo" name="versionInfo"
								  rows="3" style="min-width: 90%"
								  placeholder="请输入本版本的相关信息，本信息作为该版本的详细信息进行版本介绍。"></textarea>
					</div>
				</div>

				<div class="form-group">
					<label for="apkFile" class="col-sm-2 control-label">apk文件 *</label>
					<div class="col-sm-8">
						<input type="file" class="form-control" id="apkFile" name="apkFile" placeholder="请上传apk">
						<input type="hidden" id="apkFileName" name="apkFileName">
						<a id="apkFilePath"></a>
					</div>
				</div>

				<div class="form-group">
					<div class="col-sm-offset-3">
						<button id="submit_btn" class="btn btn-success">保存</button>
						<a href="./modify_msg.html" class="btn btn-primary">返回</a>
					</div>
				</div>
			</form>
		
	</div>
	</div>

	<script type="text/javascript" src="../../js/jquery-3.4.1.min.js"></script>
	<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.form/4.3.0/jquery.form.min.js" integrity="sha384-qlmct0AOBiA2VPZkMY3+2WqkHtIQ9lSdAsAn5RUJD/3vA5MKDgSGcdmIv4ycVxyn" crossorigin="anonymous"></script>
	<script type="text/javascript" src="../../js/bootstrap.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
	<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
	<script type="text/javascript" src="../../js/add_version_msg.js"></script>
</body>
</html>